const path = require('path')
const resolve = dir => {
  return path.join(__dirname, dir)
}
module.exports = {
  publicPath: '/',
  lintOnSave: false,
  productionSourceMap: false,
  transpileDependencies: [],
  parallel: false,
  devServer: {
    proxy: {
      // 例如，所有以 /api 开头的请求都会代理到目标服务器
      '/papg-api': {
        target: 'http://101.200.184.12:9100/papg-api',
        changeOrigin: true,
        pathRewrite: {
          '^/papg-api': '/'
        }
      }
    }
  },
  chainWebpack: config => {
    config.resolve.alias
      .set('_c', resolve('src/components')) // key,value自行定义，比如.set('@@', resolve('src/components'))
  },
}
